package com.jiangong.controller;

import com.jiangong.entity.*;
import com.jiangong.service.OutdoorEnvironmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/OutdoorEnvironment")
public class OutdoorEnvironmentController {
    @Autowired
    private OutdoorEnvironmentService outdoorEnvironmentService;

    @RequestMapping("/baseInformation")
    public Result baseInformation() {
        OutdoorEnvironment outdoorEnvironment = outdoorEnvironmentService.baseInformation();
        return Result.success(outdoorEnvironment);
    }
    @RequestMapping("/tempHumidityHours")
    public Result tempHumidityHours() {
        List<OutdoorEnvironmentTH24> outdoorEnvironment = outdoorEnvironmentService.tempHumidityHours();
        return Result.success(outdoorEnvironment);
    }
    @RequestMapping("/IrrationHours")
    public Result IrrationHours() {
        List<OutdoorEnvironmentIrr24> outdoorEnvironment = outdoorEnvironmentService.IrrationHours();
        return Result.success(outdoorEnvironment);
    }
    @RequestMapping("/tempHumidityDays")
    public Result tempHumidityDays() {
        List<OutdoorEnvironmentTH30> outdoorEnvironment = outdoorEnvironmentService.tempHumidityDays();
        return Result.success(outdoorEnvironment);
    }
    @RequestMapping("/IrrationDays")
    public Result IrrationDays() {
        List<OutdoorEnvironmentIrr30> outdoorEnvironment = outdoorEnvironmentService.IrrationDays();
        return Result.success(outdoorEnvironment);
    }
    @RequestMapping("/tempWindPowerDays")
    public Result tempWindPowerDays() {
        List<OutdoorEnvironmentTWP30> outdoorEnvironment = outdoorEnvironmentService.tempWindPowerDays();
        return Result.success(outdoorEnvironment);
    }
    @RequestMapping("/PMDays")
    public Result PMDays() {
        List<OutdoorEnvironmentPM30> outdoorEnvironment = outdoorEnvironmentService.PMDays();
        return Result.success(outdoorEnvironment);
    }
}
